
## 此阶段用于在快速模式(默认为调试配置)下从 VS 运行时
#WORKDIR /app
#EXPOSE 5000

# 此阶段用于生成服务项目
ARG repo_mirrors="192.168.21.168:10025/mirrors/"
ARG repo_local="192.168.21.168:10025/"

FROM ${repo_local}srv/sdk:6.3.x.1 AS publish
WORKDIR /src
COPY . .

WORKDIR /src/Yiban.PLM.Web.Inventory
RUN dotnet publish "./Yiban.PLM.Web.Inventory.csproj" --self-contained false -c Release -o /app/publish /p:UseAppHost=false
RUN echo ======================================== >> version.info.tmp
RUN cat version.info.tmp >>  /app/publish/version.info

# 此阶段在生产中使用，或在常规模式下从 VS 运行时使用(在不使用调试配置时为默认值)
FROM ${repo_mirrors}mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
COPY --from=publish /app/publish .

ENTRYPOINT ["dotnet", "Yiban.PLM.Web.Inventory.dll"]